package com.codegen.gbcodegen.util;


import org.python.util.PythonInterpreter;

import java.io.*;

public class test {

    public static void main(String[] args) throws IOException, InterruptedException {
//        String url = "www.baidu.com";
//        String[] args1 = new String[] {"D:\\codes\\guobin\\src\\main\\java\\com\\codegen\\gbcodegen\\python\\tset.py", url};
//
//        Process pr=Runtime.getRuntime().exec(args1);
//        BufferedReader in = new BufferedReader(new InputStreamReader(
//                pr.getInputStream()));
//        String line;
//        while ((line = in.readLine()) != null) {
//            System.out.println(line);
//        }
//        in.close();
//        pr.waitFor();
//        System.out.println("end");

        PythonInterpreter pin = new PythonInterpreter();
//        InputStream is = new FileInputStream("D:\\codes\\guobin\\src\\main\\java\\com\\codegen\\gbcodegen\\python\\tset.py");
//        pin.execfile(is);
//        is.close();
        pin.execfile("D:\\codes\\guobin\\src\\main\\java\\com\\codegen\\gbcodegen\\python\\tset.py");
    }
}
